package com.pacai.Method;

public class MethodDetail02 {
    public static void main(String[] args) {
        A a = new A();
        a.sayOk();
        a.m1();
    }
}

class A{
    public void print(int n){
        System.out.println("print()方法被调用" + n);
    }

    public void sayOk(){
        print(10);
        System.out.println("继续执行sayOk()");
    }

    public void m1(){
        System.out.println("m1方法被调用");
        B b = new B();
    }
}

class B{
    public void hi(){
        System.out.println("hi方法被调用");
    }
}